Skip to content

Conversation

@Cyncrovee
Copy link

This PR solves the issue I raised in #579 by adding a new rust-test-output function.

@Dushistov
Copy link

This can use C-u prefix, like it is implemented in https://github.com/ayrat555/cargo-mode .
Where M-x cargo-process-test run predefined command,
but if you run C-u M-x cargo-process-test then it is allowed you to edit predefined command and add wherever you want, like -- --show-output or -- --no-capture.

Copy link
Member

@psibi psibi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! How about modifying rust-test to accept universal argument instead and allow it configure arbitrary argument instead ?

This would allow us to accept any arbitrary options to be passed instead of this specific usecase. You can look into rustic mode for inspiration: https://github.com/emacs-rustic/rustic?tab=readme-ov-file#test

@Cyncrovee
Copy link
Author

Thanks! How about modifying rust-test to accept universal argument instead and allow it configure arbitrary argument instead ?

This would allow us to accept any arbitrary options to be passed instead of this specific usecase. You can look into rustic mode for inspiration: https://github.com/emacs-rustic/rustic?tab=readme-ov-file#test

Thank you, will definitely look into this suggestion when I get chance.

@Cyncrovee
Copy link
Author

Updated with the suggested change. Feel free to merge unless you want more changes, in which case let me know and I'll take a look.

@Cyncrovee
Copy link
Author

Hold on, I seem to have misread the suggestion, I'm going to convert to a draft while I figure this out.

@Cyncrovee Cyncrovee marked this pull request as draft December 14, 2025 12:47
@Cyncrovee
Copy link
Author

Sorry for the wait on this, should get to it soon :]

@Cyncrovee Cyncrovee marked this pull request as ready for review January 14, 2026 15:37
@Cyncrovee
Copy link
Author

I wanted to add an empty list of arguments that would be added to whenever you passed a C-u prefix arg (and persisted across sessions), but I couldn't get it to work- so I just had to settle with this. You can pass prefix with C-u, and if you want access to previously inputted args you'll have to use the built-in minibuffer history (should be accessible via the up and down keys).

I'm going to squash the commits into one then it should be ready to merge.

This allows (optional) custom arguments to be passed the the rust-test
function (press C-u before running the function).
@Cyncrovee
Copy link
Author

Cyncrovee commented Jan 14, 2026

Sorry about that "Merge branch 'rust-lang:master' into master" commit, I didn't think it would do that (never mind, managed to fix it!). Anyway, this should be ready to merge now.

@Cyncrovee
Copy link
Author

@psibi Sorry for the ping, just wanted to ask if this is good to merge? Or if there's anything else you want added, let me know and I'll take a look.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants